package title;

import java.util.Scanner;

/**
 * 功能：
 * 作者：lc
 * 日期：2024/12/10 14:41
 */
public class Main5710 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = 1;
        int t = 0;
        m ^= n % 2;
        if (n > 4 && n <= 12) {
            t = 1;
        }
        System.out.printf("%d %d %d %d", m & t, m | t, m ^ t, (m|t)^1);
    }
}
